package com.hyperfix.simulator.senor;

import com.hyperfix.models.simulator.pojos.params.Flow;
import com.hyperfix.utils.common.RandomUtil;

/**
 * @author JiangChunYu
 * 2024/3/19
 */
public class FlowSenor implements InstantParamSenor {
    @Override
    public byte[] nextData() {
        int v = RandomUtil.nextRangeInt(Flow.getMaxValue(), Flow.getMinValue());
        byte[] data = new byte[2];
        data[0] = (byte) (v >>> 8);
        data[1] = (byte) v;
        return data;
    }
}
